import {h, renderSlots} from "../../lib/guide-mini-vue.esm.js";

export const Foo = {
    setup(props, {emit}) {
        return {}
    }, render() {
        const foo = h("p", {}, "foo组件");
        // 插槽中的元素当做子节点传入children 属性对应的数组,这些值放在$slotss属性里面
        console.log(1111)
        console.log(this.$slots)

        const age = 18;
        return h("div", {},
            [
                renderSlots(this.$slots, "header",{
                    age,
                }),
                foo,
                renderSlots(this.$slots, "footer")
            ]
        );
    },

}